package com.gem.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * @author 刘聪
 * Created  on 2020/9/16
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student implements Serializable {

    private Long id;
    private String name;//姓名
    private String studentNumber;//学号
    private String password;//密码
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday;
    private Gender gender;
    private Polity polity;//政治面貌
    private String brief;//简介

    public Student(String name, String studentNumber, String password, LocalDate birthday, Gender gender, Polity polity, String brief) {
        this.name = name;
        this.studentNumber = studentNumber;
        this.password = password;
        this.birthday = birthday;
        this.gender = gender;
        this.polity = polity;
        this.brief = brief;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", studentNumber='" + studentNumber + '\'' +
                ", password='" + password + '\'' +
                ", birthday=" + birthday +
                ", gender=" + gender +
                ", polity=" + polity +
                ", brief='" + brief + '\'' +
                '}';
    }
}
